<template>
  <ant-modal
    modalWidth="580"
    modalHeight="450"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model
      ref="form"
      :model="form"
      :rules="rules"
      slot="content"
      layout="vertical"
    >
      <a-row :gutter="32" style="width: 90%; margin-left: 5%">
        <a-col :span="12">
          <a-form-model-item label="进件编号" prop="jinjianId">
            <a-input
              v-model="form.jinjianId"
              placeholder="请输入进件编号"
              disabled
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="签约金额(元)" prop="fkAmount">
            <a-input
              v-model="form.fkAmount"
              placeholder="请输入进件编号"
              disabled
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="结算类型" prop="type">
            <a-select
              placeholder="请选择结算类型"
              v-model="form.type"
              :getPopupContainer="
                (triggerNode) => {
                  return triggerNode.parentNode || document.body;
                }
              "
              style="width: 100%"
              allow-clear
            >
              <a-select-option
                v-for="(d, index) in typeOptions"
                :key="index"
                :value="d.dictValue"
                >{{ d.dictLabel }}</a-select-option
              >
            </a-select>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item
            label="结算金额(元)"
            prop="amount"
            v-if="form.type == 1"
          >
            <a-input-number
              v-model="form.amount"
              :min="0"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="结算比例" prop="lv" v-if="form.type == 2">
            <a-input-number v-model="form.lv" :min="0" style="width: 100%" />
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="结算状态" prop="status">
            <a-select
              placeholder="请选择结算状态"
              v-model="form.status"
              :getPopupContainer="
                (triggerNode) => {
                  return triggerNode.parentNode || document.body;
                }
              "
              style="width: 100%"
              allow-clear
            >
              <a-select-option
                v-for="(d, index) in statusOptions"
                :key="index"
                :value="d.dictValue"
                >{{ d.dictLabel }}</a-select-option
              >
            </a-select>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel"> 取消 </a-button>
      <a-button type="primary" @click="submitForm"> 保存 </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizCapBillAddForm from "./BizCapBillForm";
export default {
  ...BizCapBillAddForm,
};
</script>
